from pydantic import BaseModel, Field
from typing import Optional


class DeptCreate(BaseModel):
    dept_name: str = Field(..., description="事业部名称")
    dept_code: str = Field(..., description="事业部编码")
    descriptions: Optional[str] = Field(None, description="描述信息")
    status: Optional[bool] = Field(True, description="是否启用")
    parent_id: Optional[int] = Field(None, description="上级部门ID")
    parent_name: Optional[str] = Field(None, description="上级部门名称")
    parent_code: Optional[str] = Field(None, description="上级部门编码")
    manager_id: Optional[int] = Field(None, description="主管ID")
    manager_name: Optional[str] = Field(None, description="主管名称")


class DeptUpdate(BaseModel):
    dept_name: Optional[str] = Field(None, description="事业部名称")
    dept_code: Optional[str] = Field(None, description="事业部编码")
    descriptions: Optional[str] = Field(None, description="描述信息")
    status: Optional[bool] = Field(None, description="是否启用")
    parent_id: Optional[int] = Field(None, description="上级部门ID")
    parent_name: Optional[str] = Field(None, description="上级部门名称")
    parent_code: Optional[str] = Field(None, description="上级部门编码")
    manager_id: Optional[int] = Field(None, description="主管ID")
    manager_name: Optional[str] = Field(None, description="主管名称")